home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 591 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 77 73 2e 63 6c 61 72 6b |Path: ne|ws.clark|
|00000010| 2e 6e 65 74 21 75 73 65 | 6e 65 74 0a 46 72 6f 6d |.net!use|net.From|
|00000020| 3a 20 6a 77 6f 68 6c 67 | 65 6d 40 63 6c 61 72 6b |: jwohlg|em@clark|
|00000030| 2e 6e 65 74 20 28 4a 61 | 73 6f 6e 20 57 6f 68 6c |.net (Ja|son Wohl|
|00000040| 67 65 6d 75 74 68 29 0a | 4e 65 77 73 67 72 6f 75 |gemuth).|Newsgrou|
|00000050| 70 73 3a 20 63 6f 6d 70 | 2e 6c 61 6e 67 2e 63 0a |ps: comp|.lang.c.|
|00000060| 53 75 62 6a 65 63 74 3a | 20 50 6f 72 74 69 6e 67 |Subject:| Porting|
|00000070| 20 43 20 53 65 72 69 61 | 6c 20 43 6f 64 65 28 47 | C Seria|l Code(G|
|00000080| 43 43 29 20 53 75 6e 4f | 53 20 2d 3e 20 44 69 67 |CC) SunO|S -> Dig|
|00000090| 69 74 61 6c 20 55 6e 69 | 78 0a 44 61 74 65 3a 20 |ital Uni|x.Date: |
|000000a0| 53 75 6e 2c 20 30 37 20 | 4a 61 6e 20 31 39 39 36 |Sun, 07 |Jan 1996|
|000000b0| 20 31 37 3a 31 32 3a 34 | 39 20 47 4d 54 0a 4f 72 | 17:12:4|9 GMT.Or|
|000000c0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 49 6e 76 65 |ganizati|on: Inve|
|000000d0| 73 74 6d 65 6e 74 20 4e | 65 77 73 20 4f 6e 6c 69 |stment N|ews Onli|
|000000e0| 6e 65 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |ne.Messa|ge-ID: <|
|000000f0| 34 63 6f 75 74 6e 24 64 | 6a 38 40 63 6c 61 72 6b |4coutn$d|j8@clark|
|00000100| 6e 65 74 2e 63 6c 61 72 | 6b 2e 6e 65 74 3e 0a 52 |net.clar|k.net>.R|
|00000110| 65 70 6c 79 2d 54 6f 3a | 20 6a 77 6f 68 6c 67 65 |eply-To:| jwohlge|
|00000120| 6d 40 63 6c 61 72 6b 2e | 6e 65 74 0a 4e 4e 54 50 |m@clark.|net.NNTP|
|00000130| 2d 50 6f 73 74 69 6e 67 | 2d 48 6f 73 74 3a 20 6a |-Posting|-Host: j|
|00000140| 77 6f 68 6c 67 65 6d 2e | 63 6c 61 72 6b 2e 6e 65 |wohlgem.|clark.ne|
|00000150| 74 0a 4d 69 6d 65 2d 56 | 65 72 73 69 6f 6e 3a 20 |t.Mime-V|ersion: |
|00000160| 31 2e 30 0a 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |1.0.Cont|ent-Type|
|00000170| 3a 20 54 45 58 54 2f 50 | 4c 41 49 4e 3b 20 63 68 |: TEXT/P|LAIN; ch|
|00000180| 61 72 73 65 74 3d 49 53 | 4f 2d 38 38 35 39 2d 31 |arset=IS|O-8859-1|
|00000190| 0a 43 6f 6e 74 65 6e 74 | 2d 54 72 61 6e 73 66 65 |.Content|-Transfe|
|000001a0| 72 2d 45 6e 63 6f 64 69 | 6e 67 3a 20 38 62 69 74 |r-Encodi|ng: 8bit|
|000001b0| 0a 58 2d 4e 65 77 73 72 | 65 61 64 65 72 3a 20 46 |.X-Newsr|eader: F|
|000001c0| 6f 72 74 65 20 46 72 65 | 65 20 41 67 65 6e 74 20 |orte Fre|e Agent |
|000001d0| 31 2e 30 2e 38 32 0a 0a | 46 6f 6c 6b 73 2c 0a 0a |1.0.82..|Folks,..|
|000001e0| 41 6e 79 20 68 65 6c 70 | 20 6f 6e 20 74 68 69 73 |Any help| on this|
|000001f0| 20 70 72 6f 62 6c 65 6d | 20 77 6f 75 6c 64 20 62 | problem| would b|
|00000200| 65 20 61 70 70 72 65 63 | 69 61 74 65 64 2e 0a 0a |e apprec|iated...|
|00000210| 49 20 68 61 76 65 20 61 | 20 62 6f 78 20 49 20 61 |I have a| box I a|
|00000220| 6d 20 74 61 6c 6b 69 6e | 67 20 74 6f 20 77 68 69 |m talkin|g to whi|
|00000230| 63 68 20 67 69 76 65 73 | 20 6d 65 20 61 20 66 65 |ch gives| me a fe|
|00000240| 65 64 20 75 73 69 6e 67 | 20 33 38 34 30 30 2c 4f |ed using| 38400,O|
|00000250| 2c 38 2c 31 2e 0a 57 68 | 79 20 74 68 65 79 20 75 |,8,1..Wh|y they u|
|00000260| 73 65 20 6f 64 64 20 70 | 61 72 69 74 79 20 49 20 |se odd p|arity I |
|00000270| 68 61 76 65 20 74 6f 20 | 69 64 65 61 2e 0a 0a 54 |have to |idea...T|
|00000280| 68 69 73 20 63 6f 64 65 | 20 77 6f 72 6b 73 20 66 |his code| works f|
|00000290| 69 6e 65 20 6f 6e 20 61 | 20 53 75 6e 20 53 70 61 |ine on a| Sun Spa|
|000002a0| 72 63 20 32 20 72 75 6e | 6e 69 6e 67 20 53 75 6e |rc 2 run|ning Sun|
|000002b0| 4f 53 20 34 2e 31 2e 33 | 5f 55 31 20 3a 0a 7b 0a |OS 4.1.3|_U1 :.{.|
|000002c0| 20 20 20 20 20 20 20 20 | 69 66 28 69 6f 63 74 6c | |if(ioctl|
|000002d0| 28 64 65 76 69 63 65 2c | 20 54 43 47 45 54 41 2c |(device,| TCGETA,|
|000002e0| 20 26 74 65 72 6d 29 20 | 3d 3d 20 2d 31 29 20 70 | &term) |== -1) p|
|000002f0| 65 72 72 6f 72 28 22 54 | 43 47 45 54 41 22 29 3b |error("T|CGETA");|
|00000300| 0a 20 20 20 20 20 20 20 | 20 74 65 72 6d 2e 63 5f |. | term.c_|
|00000310| 6f 66 6c 61 67 20 26 3d | 20 7e 28 4f 50 4f 53 54 |oflag &=| ~(OPOST|
|00000320| 29 3b 0a 20 20 20 20 20 | 20 20 20 74 65 72 6d 2e |);. | term.|
|00000330| 63 5f 6c 66 6c 61 67 20 | 26 3d 20 7e 28 45 43 48 |c_lflag |&= ~(ECH|
|00000340| 4f 7c 49 43 41 4e 4f 4e | 7c 49 53 49 47 7c 58 43 |O|ICANON||ISIG|XC|
|00000350| 41 53 45 29 3b 0a 20 20 | 20 20 20 20 20 20 74 65 |ASE);. | te|
|00000360| 72 6d 2e 63 5f 63 66 6c | 61 67 20 7c 3d 20 73 70 |rm.c_cfl|ag |= sp|
|00000370| 65 65 64 3b 0a 20 20 20 | 20 20 20 20 20 74 65 72 |eed;. | ter|
|00000380| 6d 2e 63 5f 63 63 5b 56 | 4d 49 4e 5d 20 20 3d 20 |m.c_cc[V|MIN] = |
|00000390| 31 3b 0a 20 20 20 20 20 | 20 20 20 74 65 72 6d 2e |1;. | term.|
|000003a0| 63 5f 63 63 5b 56 54 49 | 4d 45 5d 20 3d 20 30 3b |c_cc[VTI|ME] = 0;|
|000003b0| 0a 20 20 20 20 20 20 20 | 20 69 66 28 69 6f 63 74 |. | if(ioct|
|000003c0| 6c 28 64 65 76 69 63 65 | 2c 20 54 43 53 45 54 41 |l(device|, TCSETA|
|000003d0| 2c 20 26 74 65 72 6d 29 | 20 3d 3d 20 2d 31 29 20 |, &term)| == -1) |
|000003e0| 70 65 72 72 6f 72 28 22 | 54 43 53 45 54 41 22 29 |perror("|TCSETA")|
|000003f0| 3b 0a 20 20 20 20 20 20 | 20 20 66 63 6e 74 6c 28 |;. | fcntl(|
|00000400| 64 65 76 69 63 65 2c 20 | 46 5f 53 45 54 46 4c 2c |device, |F_SETFL,|
|00000410| 20 30 29 3b 0a 20 20 20 | 20 20 20 20 20 61 6c 61 | 0);. | ala|
|00000420| 72 6d 28 35 29 3b 0a 20 | 20 20 20 20 20 20 20 69 |rm(5);. | i|
|00000430| 66 28 63 6c 6f 73 65 28 | 6f 70 65 6e 28 64 6e 61 |f(close(|open(dna|
|00000440| 6d 65 2c 20 4f 5f 52 44 | 4f 4e 4c 59 29 29 20 3d |me, O_RD|ONLY)) =|
|00000450| 3d 20 2d 31 20 29 20 7b | 0a 20 20 20 20 20 20 20 |= -1 ) {|. |
|00000460| 20 20 20 20 20 20 20 20 | 20 65 78 69 74 28 31 29 | | exit(1)|
|00000470| 3b 0a 20 20 20 20 20 20 | 20 20 7d 0a 20 20 20 20 |;. | }. |
|00000480| 20 20 20 20 61 6c 61 72 | 6d 28 30 29 3b 0a 7d 0a | alar|m(0);.}.|
|00000490| 0a 0a 54 68 69 73 20 69 | 73 20 77 68 61 74 20 49 |..This i|s what I|
|000004a0| 20 68 61 76 65 20 63 75 | 72 72 65 6e 74 6c 79 20 | have cu|rrently |
|000004b0| 6f 6e 20 74 68 65 20 32 | 30 30 6d 68 7a 20 44 65 |on the 2|00mhz De|
|000004c0| 63 20 41 6c 70 68 61 20 | 53 65 72 76 65 72 20 72 |c Alpha |Server r|
|000004d0| 75 6e 6e 69 6e 67 20 0a | 4f 53 46 2e 0a 0a 7b 0a |unning .|OSF...{.|
|000004e0| 20 20 20 20 20 20 20 20 | 69 66 28 69 6f 63 74 6c | |if(ioctl|
|000004f0| 28 64 65 76 69 63 65 2c | 20 54 43 47 45 54 41 2c |(device,| TCGETA,|
|00000500| 20 26 74 65 72 6d 29 20 | 3d 3d 20 2d 31 29 20 70 | &term) |== -1) p|
|00000510| 65 72 72 6f 72 28 22 54 | 43 47 45 54 41 22 29 3b |error("T|CGETA");|
|00000520| 0a 0a 20 20 20 20 20 20 | 20 20 74 65 72 6d 2e 63 |.. | term.c|
|00000530| 5f 69 66 6c 61 67 20 3d | 20 20 28 49 4e 50 43 4b |_iflag =| (INPCK|
|00000540| 29 3b 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |); | /* |
|00000550| 41 64 64 65 64 20 2a 2f | 0a 20 20 20 20 20 20 20 |Added */|. |
|00000560| 20 74 65 72 6d 2e 63 5f | 6f 66 6c 61 67 20 26 3d | term.c_|oflag &=|
|00000570| 20 7e 28 4f 50 4f 53 54 | 29 3b 0a 20 20 20 20 20 | ~(OPOST|);. |
|00000580| 20 20 20 74 65 72 6d 2e | 63 5f 6c 66 6c 61 67 20 | term.|c_lflag |
|00000590| 26 3d 20 7e 28 45 43 48 | 4f 7c 49 43 41 4e 4f 4e |&= ~(ECH|O|ICANON|
|000005a0| 7c 49 53 49 47 7c 58 43 | 41 53 45 29 3b 0a 20 20 ||ISIG|XC|ASE);. |
|000005b0| 20 20 20 20 20 20 74 65 | 72 6d 2e 63 5f 63 66 6c | te|rm.c_cfl|
|000005c0| 61 67 20 7c 3d 20 73 70 | 65 65 64 3b 0a 20 20 20 |ag |= sp|eed;. |
|000005d0| 20 20 20 20 20 74 65 72 | 6d 2e 63 5f 63 66 6c 61 | ter|m.c_cfla|
|000005e0| 67 20 26 3d 20 7e 28 50 | 41 52 45 4e 42 7c 50 41 |g &= ~(P|ARENB|PA|
|000005f0| 52 4f 44 44 29 3b 20 20 | 2f 2a 20 41 64 64 65 64 |RODD); |/* Added|
|00000600| 20 2a 2f 0a 20 20 20 20 | 20 20 20 20 74 65 72 6d | */. | term|
|00000610| 2e 63 5f 63 63 5b 56 4d | 49 4e 5d 20 20 3d 20 31 |.c_cc[VM|IN] = 1|
|00000620| 3b 0a 20 20 20 20 20 20 | 20 20 74 65 72 6d 2e 63 |;. | term.c|
|00000630| 5f 63 63 5b 56 54 49 4d | 45 5d 20 3d 20 30 3b 0a |_cc[VTIM|E] = 0;.|
|00000640| 20 20 20 20 20 20 20 20 | 69 66 28 69 6f 63 74 6c | |if(ioctl|
|00000650| 28 64 65 76 69 63 65 2c | 20 54 43 53 45 54 41 2c |(device,| TCSETA,|
|00000660| 20 26 74 65 72 6d 29 20 | 3d 3d 20 2d 31 29 20 70 | &term) |== -1) p|
|00000670| 65 72 72 6f 72 28 22 54 | 43 53 45 54 41 22 29 3b |error("T|CSETA");|
|00000680| 0a 20 20 20 20 20 20 20 | 20 66 63 6e 74 6c 28 64 |. | fcntl(d|
|00000690| 65 76 69 63 65 2c 20 46 | 5f 53 45 54 46 4c 2c 20 |evice, F|_SETFL, |
|000006a0| 30 29 3b 0a 20 20 20 20 | 20 20 20 20 61 6c 61 72 |0);. | alar|
|000006b0| 6d 28 35 29 3b 0a 20 20 | 20 20 20 20 20 20 69 66 |m(5);. | if|
|000006c0| 28 63 6c 6f 73 65 28 6f | 70 65 6e 28 64 6e 61 6d |(close(o|pen(dnam|
|000006d0| 65 2c 20 4f 5f 52 44 4f | 4e 4c 59 29 29 20 3d 3d |e, O_RDO|NLY)) ==|
|000006e0| 20 2d 31 20 29 20 7b 0a | 20 20 20 20 20 20 20 20 | -1 ) {.| |
|000006f0| 20 20 20 20 20 20 20 20 | 65 78 69 74 28 31 29 3b | |exit(1);|
|00000700| 0a 20 20 20 20 20 20 20 | 20 7d 0a 20 20 20 20 20 |. | }. |
|00000710| 20 20 20 61 6c 61 72 6d | 28 30 29 3b 20 20 20 20 | alarm|(0); |
|00000720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 0a | | .|
|00000730| 7d 20 20 20 20 20 20 20 | 20 20 0a 0a 0a 54 68 65 |} | ...The|
|00000740| 20 61 6c 70 68 61 20 73 | 65 65 6d 73 20 67 65 74 | alpha s|eems get|
|00000750| 20 64 61 74 61 20 74 68 | 61 74 20 68 61 73 20 77 | data th|at has w|
|00000760| 69 65 72 64 20 63 68 61 | 72 61 63 74 65 72 73 20 |ierd cha|racters |
|00000770| 61 6c 6c 20 74 68 72 6f | 75 67 68 20 69 74 0a 62 |all thro|ugh it.b|
|00000780| 65 63 61 75 73 65 20 74 | 68 65 20 70 61 72 69 74 |ecause t|he parit|
|00000790| 79 20 69 73 6e 27 74 20 | 77 6f 72 6b 69 6e 67 2e |y isn't |working.|
|000007a0| 20 20 54 68 65 20 73 70 | 61 72 63 20 73 65 65 6d | The sp|arc seem|
|000007b0| 73 20 74 6f 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |s to aut|omatical|
|000007c0| 6c 79 0a 73 74 72 69 70 | 20 70 61 72 69 74 79 20 |ly.strip| parity |
|000007d0| 77 68 69 63 68 20 69 73 | 20 6e 69 63 65 2e 20 20 |which is| nice. |
|000007e0| 48 6f 77 20 63 61 6e 20 | 49 20 73 74 72 69 70 20 |How can |I strip |
|000007f0| 70 61 72 69 74 79 20 66 | 72 6f 6d 20 74 68 65 20 |parity f|rom the |
|00000800| 70 6f 72 74 20 6f 6e 0a | 74 68 65 20 41 6c 70 68 |port on.|the Alph|
|00000810| 61 20 6f 72 20 77 68 61 | 74 20 69 73 20 77 72 6f |a or wha|t is wro|
|00000820| 6e 67 20 69 6e 20 74 68 | 65 20 70 61 72 69 74 79 |ng in th|e parity|
|00000830| 20 70 61 72 74 20 6f 66 | 20 6d 79 20 43 20 63 6f | part of| my C co|
|00000840| 64 65 2e 0a 0a 54 68 61 | 6e 6b 73 20 66 6f 72 20 |de...Tha|nks for |
|00000850| 79 6f 75 72 20 74 69 6d | 65 2c 0a 4a 61 73 6f 6e |your tim|e,.Jason|
|00000860| 20 57 6f 68 6c 67 65 6d | 75 74 68 20 20 20 20 20 | Wohlgem|uth |
|00000870| 20 20 20 20 20 0a 0a | | .. | |
+--------+-------------------------+-------------------------+--------+--------+